package ui.datagrid
{
	import common.cache.StaffCache;
	import common.model.WqStaffInfo;
	
	import mx.collections.ArrayCollection;
	
	import spark.components.gridClasses.GridColumn;
	
	public class StaffGridColumn extends GridColumn
	{
		public var filed:String = 'staffId';
		
		protected function staffNameFunction(item:Object,column:GridColumn):String{
			var str:String ="";
			if(item.hasOwnProperty(filed)){
				var temp :WqStaffInfo =StaffCache.staffMap[item[filed]];
				if(temp){
					str = temp.cnName;
				}
			}
			return str;
		}
		
		public function StaffGridColumn(columnName:String=null)
		{
			super(columnName);
			this.labelFunction = staffNameFunction;
			this.headerText = "员工姓名";
		}
		
		
	}
}